<?php
// 目前的配置是为了nihao.net的服务器
define('PATH_HTDOCS', dirname(__FILE__).'/../');

define("WB_AKEY", 			'1583500876' );
define("WB_SKEY", 			'c74a0231f5ceee5d5d5f235cb1c1a36d' );
define("WB_AUTHORIZE_URL",	'https://api.weibo.com/oauth2/authorize' );

define('RENREN_APP_ID', 		218268);
define('RENREN_AKEY', 		'3940e921119a410586f6c7fbd1584fb6');
define('RENREN_SKEY', 			'b0fe82a8e29c4c15bedfad356bcbe4f0');
define('RENREN_TOKEN_URL', 	'http://graph.renren.com/oauth/token');
define('RENREN_SCOPE', 		'publish_share,read_user_share,publish_comment');	// 参见http://wiki.dev.renren.com/wiki/%E6%9D%83%E9%99%90%E5%88%97%E8%A1%A8

define('KAIXIN001_APP_ID',		'100044792');
define('KAIXIN001_AKEY',		'421294933625ae63978e0c508c470a2b');
define('KAIXIN001_SKEY',		'438b8bf98dca81e224ffdcbe9da5e796');
define('KAIXIN001_AUTHORIZE_URL', 'https://api.kaixin001.com/oauth2/authorize');

define('QQWB_AKEY',			'100683408');
define('QQWB_SKEY',			'3f917da33c04036e7852f6c1c7d74a26');
define('QQWB_AUTHORIZE_URL',	'https://open.t.qq.com/cgi-bin/oauth2/authorize');
define('QQWB_TOKEN_URL',		'https://open.t.qq.com/cgi-bin/oauth2/access_token');
define('QQWB_API_URL',		'https://open.t.qq.com/api/');

define('UPYUN_IMG_LOCAL_PATH', '/img/');						// 在又拍云上存储的路径，要确保img路径的存在，在执行的时候没有设置“自动创建目录”
define('UPYUN_IMG_WWW_PATH', 'http://img.ureadme.cn/img/');		// 在页面中访问的url地址
define('UPYUN_BUCKETNAME',	'imgureadme');
define('UPYUN_USERNAME',		'ureadme');
define('UPYUN_PASSWORD',		'1qazxsw2');

if (preg_match('/127.0.0.1/', $_SERVER['SERVER_ADDR']) or preg_match('/127.0.0.1/', $_SERVER['LOCAL_ADDR'])) {
	// 数据库
	$defineDB = array(
		'ureadme'	=> array(
			'dbhost'	=>'localhost',
			'dbhost_s'	=> false,
			'dbname'	=>'ureadmev07',
			'dbuser'	=>'root',
			'dbpass'	=>'123456'
		),
	);
	// smarty路径
	define('PATH_SMARTY_TEMPLATE', 	PATH_HTDOCS.'template/');				// smarty 模板路径
	define('PATH_SMARTY_CACHE', 		PATH_HTDOCS.'../../smarty_cache/');			// smarty cache
	define('PATH_SMARTY_COMPILE', 		PATH_HTDOCS.'../../smarty_compile/');		// smarty compile
} else {
	// 数据库
	$defineDB = array(
		'ureadme'	=> array(
			'dbhost'	=>'localhost',
			'dbhost_s'	=> false,
			'dbname'	=>'c091728',
			'dbuser'	=>'c091728',
			'dbpass'	=>'~gwsY5j6',
		),
	);
	// smarty路径
	define('PATH_SMARTY_TEMPLATE', 	PATH_HTDOCS.'template/');				// smarty 模板路径
	define('PATH_SMARTY_CACHE', 		PATH_HTDOCS.'smarty_cache/');			// smarty cache
	define('PATH_SMARTY_COMPILE', 		PATH_HTDOCS.'smarty_compile/');			// smarty compile
}
?>